#ifndef TEXTURE2D_2018
#define TEXTURE2D_2018

#include    <GL/gl.h>
#include    "../physical/physical.h"


//show area in the texture!
typedef struct textureArea
{
    GLfloat x;
    GLfloat y;
    GLfloat width;
    GLfloat height;
}TextureArea,Proportion;

namespace PersonalTexture
{
    class Texture2D
    {
    private:
        Texture2D(){}
        ~Texture2D(){}

    public:
        static inline bool CheckParameter(const GLuint textureID,const Point* position,const Texture2DSize* textureSize);

    public:
        static bool ChangeProportion(Proportion& portion,const Texture2DSize* textuerSize,const TextureArea* showArea = 0);

    public:
        static GLuint LoadTexture(const char* fileName);
        static void DrawTexture(const GLuint textureID,const Point* position,const Texture2DSize* textureSize,const TextureArea* showArea = 0);
        static void DrawReverseTexture(const GLuint textureID,const Point* position,const Texture2DSize* textureSize,const TextureArea* showArea = 0);

    };
}

#endif // TEXTURE2D_2018
